package com.wc.alorithm_luogu.P2911;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/22 10:29
 * @description https://www.luogu.com.cn/problem/P2911
 * Bovine Bones G
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int s1 = sc.nextInt();
        int s2 = sc.nextInt();
        int s3 = sc.nextInt();

        // 存放加起来的和
        int[] array = new int[s1 + s2 + s3 + 1];

        for (int i = 1; i <= s1; i++) {
            for (int j = 1; j <= s2; j++) {
                for (int k = 1; k <= s3; k++) {
                    array[i + j + k]++;
                }
            }
        }
        // 看谁出现最大的次数
        int max = array[3];
        // 存放最大值得下角标
        int index = 3;
        for (int i = 4; i < array.length; i++) {
            if (max < array[i]){
                index = i;
                max = array[i];
            }
        }
        System.out.println(index);
    }
}
